import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { RoleFormList } from './types'

// 查询菜单列表
export const invoicelist = (query:RoleFormList) => {
  return request({
    url: '/payment/invoice/list',
    method: 'get',
    params: query
  });
};
export const invoiceInfo = (query) => {
  return request({
    url: '/payment/invoice/'+query,
    method: 'get'
  });
};
// 查询发票明细列表 /payment/invoiceBill/list
export const invoiceBilllist = (query) => {
  return request({
    url: '/payment/invoiceBill/list',
    method: 'get',
    params:query
  });
};

//发票驳回
export const reject = (data) => {
  return request({
    url: '/payment/invoice/reject',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data
  });
};



//发票添加
export const uploadInvoice = (data) => {
  return request({
    url: '/payment/invoice/uploadInvoice',
    method: 'post',

    data
  });
};


//修改发票明细
export const mdyDetail = (data) => {
  return request({
    url: '/payment/invoiceDetail',
    method: 'put',
    data
  });
};


//修改快递信息
export const mdyInvoice = (data) => {
  return request({
    url: '/payment/invoice/editKd',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'post',
    data
  });
};


//快递签收
export const receivingIogistics = (data) => {
  return request({
    url: '/payment/invoice/receivingIogistics',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'post',
    data
  });
};


